/*
package com.code.aspect

import android.Manifest
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.os.Looper
import android.view.View
import android.widget.Toast
import androidx.databinding.DataBindingUtil
import com.code.aspect.databinding.ActivityMainBinding
import com.code.aspectj.AppInterceptor
import com.code.aspectj.annotation.Permission
import com.code.aspectj.annotation.SingleClick
import com.code.aspectj.annotation.ThreadIO
import com.code.aspectj.util.PermissionUtils
import com.code.aspectj.util.P

class MainActivity : AppCompatActivity() {
    companion object {
        val TAG: String = this::class.java.simpleName.toString()
    }

    private lateinit var mBinding: ActivityMainBinding
    private var mCount: Int = 0

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        mBinding =
            DataBindingUtil.setContentView(this, R.layout.activity_main)
        mBinding.t1.setOnClickListener { v ->
            permission(v)
        }
        mBinding.t2.setOnClickListener { v ->
            click(v)
        }
        mBinding.t3.setOnClickListener { v ->
            intercept()
        }
        mBinding.t4.setOnClickListener { v ->
            other()
        }
        AppInterceptor.setOnPermissionDeniedListener {
            object : PermissionUtils.OnPermissionDeniedListener {
                override fun onDenied(permissionsDenied: MutableList<String>?) {
                    P.d(TAG, "onDenied : 拒绝了权限")
                }
            }
        }
    }


    @ThreadIO
    private fun other() {

        Toast.makeText(
            this,
            "当前子线程运行 : ${mainLooper == Looper.getMainLooper()}",
            Toast.LENGTH_SHORT
        ).show();
    }

    private fun intercept() {


    }

    @SingleClick(value = 1000)
    private fun click(v: View) {
        mCount++
        P.d(TAG, "点击了一次 ->$mCount")
    }

    @Permission(value = [Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE])
    private fun permission(v: View) {
        //P.d(TAG, "已有权限")
        println("已有权限")
    }
}*/
